import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import NotFound from '../views/NotFound.vue'
import SearchPage from '../views/SearchPage.vue'
import NavPage from '../views/NavPage.vue'
import SoftPage from '../views/SoftPage.vue'
import LabelPage from '../views/LabelPage.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: HomeView,
    children: [
      { path: '/', component: SearchPage },
      { path: '/nav', component: NavPage },
      { path: '/soft', component: SoftPage },
      { path: '/label', component: LabelPage }
    ]
  },
  {
    path: '*',
    name: '404',
    component: NotFound
  }
]

const router = new VueRouter({
  routes
})

export default router
